//
//  DiagnosisViewController.m
//  AnXin100
//
//  Created by Sakura on 2018/11/10.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "DiagnosisViewController.h"
#import "DiagnosisTableViewCell.h"
@interface DiagnosisViewController ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UITableView *mainTable;
@end

@implementation DiagnosisViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.mainTable];
    
}

- (UITableView *)mainTable {
    if (!_mainTable) {
        
        _mainTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - Hn - 44) style:UITableViewStylePlain];
        _mainTable.delegate = self;
        _mainTable.dataSource = self;
        [_mainTable registerClass:[DiagnosisTableViewCell class] forCellReuseIdentifier:@"DiagnosisTableViewCell"];
        
    }
    return _mainTable;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 300;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    DiagnosisTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DiagnosisTableViewCell"];
    cell.type = _index;
    return cell;
}


@end
